package com.tky.leave.utils;

import com.zhy.http.okhttp.OkHttpUtils;
import com.zhy.http.okhttp.callback.StringCallback;

import java.util.Map;

/**
 * Created by WX on 2016/1/20.
 */
public class OkUtils {

    public static void get(String url, StringCallback callback) {
        OkHttpUtils
                .get()
                .url(url)
                .build()
                .execute(callback);
    }

    public static void getWithParams(String url, Map<String, String> params, StringCallback callback) {
        OkHttpUtils
                .get()
                .url(url)
                .params(params)
                .build()
                .execute(callback);
    }

}
